function f(){
	var num= t1.value;//获取文本框内容
	var string = " ";
	for(var i = 0; i < num ;i++){
		var maxNum = 16 * 16 * 16 * 16 * 16 * 16 -1;
		var colorNum = Math.round(Math.random() *maxNum);
		var color = "#" + colorNum.toString(16);//转换为16进制
		string += "<span style = 'color:" + color + "'> ★ <span>";//color:color--color的属性：变量
	}
	d1.innerHTML = string;
	
}
